package cn.iocoder.yudao.module.crm.dal.mysql.coursepackagerlt;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.crm.controller.admin.course.vo.CoursePackageRltPageReqVO;
import cn.iocoder.yudao.module.crm.dal.dataobject.coursepackagerlt.CoursePackageRltDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 课程套餐关系 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface CoursePackageRltMapper extends BaseMapperX<CoursePackageRltDO> {

    default PageResult<CoursePackageRltDO> selectPage(CoursePackageRltPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CoursePackageRltDO>()
                .eqIfPresent(CoursePackageRltDO::getCourseId, reqVO.getCourseId())
                .eqIfPresent(CoursePackageRltDO::getCoursePackageId, reqVO.getCoursePackageId())
                .betweenIfPresent(CoursePackageRltDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(CoursePackageRltDO::getId));
    }

}